<?php

namespace App\Models;

use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password','img','phone','iden',
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];

    public function cartItems()
    {
        return $this->hasMany(CartItem::class);
    }

    public static function getDownLine($id){

    }

    public function cashs()
    {
        return $this->hasMany(Cash::class);
    }

    public function addresses()
    {
        return $this->hasMany(UserAddress::class);
    }

    public function Order()
    {
        return $this->hasMany(Order::class);
    }

//    public function Message()
//    {
//        return $this->hasMany(Message::class);
//    }


}
